<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://www.ccut.edu.cn/saturn" prefix="saturn"%>
<%@ include file="/extjs/include/all.jsp" %>
<html>
<head>
<title>Saturn Debug</title>
</head>
<body>
<%
	String key = request.getParameter("key");
%>
<div id='debugThread'></div>
<script>
  var debugThread = new Ext.data.JsonStore({	
	    url: '${pageContext.request.contextPath}/edu.ccut.saturn.manager.debug.impl::/extDebugModule/action/DebugThreadDetail.action?name=<%=key%>',
		root: 'debugThread',
		
		fields:[
			{name:'name',mapping:'name'},
			{name:'key',mapping:'key'},
			{name:'startStr',mapping:'startStr'},
			{name:'endStr',mapping:'endStr'},
			{name:'runTime',mapping:'runTime'}
		]
	});	
	
	debugThread.load();
	
	var name;
	var key;
	var startTimeStr;
	var endTimeStr;
   	var runTime;
	
	debugThread.on('load', function(){
	    name = debugThread.getAt(0).get('name');
	    key = debugThread.getAt(0).get('key');
	    startTimeStr = debugThread.getAt(0).get('startStr');
	    endTimeStr = debugThread.getAt(0).get('endStr');
	    runTime = debugThread.getAt(0).get('runTime');
	    myPanel();	    
	});
function myPanel(){
Ext.onReady(function(){
	var debugThread = new Ext.FormPanel({
		title:'Debug线程明细',
		renderTo:'debugThread',
		frame:true,
		bodyStyle:'padding:5px,5px,0',
		items:[{
			layout:'form',
			items:[{
				layout:'column',
				items:[{
					columnWidth:.15,
					xtype:'label',
					text:'名称'
				},{
					columnWidth:.8,
					xtype:'label',
					text:name
				}]
			},{
				layout:'column',
				items:[{
					columnWidth:.15,
					xtype:'label',
					text:'开始时间'
				},{
					columnWidth:.8,
					xtype:'label',
					text:startTimeStr
				}]
			},{
				layout:'column',
				items:[{
					columnWidth:.15,
					xtype:'label',
					text:'结束时间'
				},{
					columnWidth:.8,
					xtype:'label',
					text:endTimeStr
				}]
			},{
				layout:'column',
				items:[{
					columnWidth:.15,
					xtype:'label',
					text:'运行时间(秒)'
				},{
					columnWidth:.8,
					xtype:'label',
					text:runTime
				}]
			}]
		}]
	});
});}
</script>
</body>
</html>